home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / pkey12_1.zip / EE.LSP < prev    next >
Text File  |  1992-09-13  |  983b  |  34 lines

  1. (defun ederr (s)
  2. (if (/= s "Function cancelled")(princ (strcat "\nError: " s)))
  3. (setq *error* oer ederr  nil )(princ))
  4. (setq oer  *error*  *error*  ederr)
  5. (princ "\nExternal Editor Program - Make sure editor is on path.")
  6. (princ "\nDefault name for editor is EDIT.")
  7. (setq ss (ssget))
  8. (setq counter 0)
  9. (setq tftemp "tempfil.xxx")
  10. (prompt "Writing text...")
  11. (setq txt(open tftemp "w"))
  12. (while
  13.   (setq e (ssname ss counter))
  14.   (setq st (cdr (assoc 1 (entget e))))
  15.   (setq sp(cdr (assoc 10 (entget e))))
  16.   (setq sl(cdr (assoc 7 (entget e))))
  17.   (princ st txt)
  18.   (princ "\n" txt)
  19.   (setq counter (+ counter 1)))
  20. (progn
  21.   (close txt)
  22.   (command "edit" tftemp)
  23.   (command "erase" ss "")
  24.   (setq sp(getpoint "\nNew startpoint for text: "))
  25.   (if (= sp nil)(ederr))
  26.   (setq txt(open tftemp "r"))
  27.   (setq dt(read-line txt))
  28.   (command "text" "s" sl sp "" dt)
  29.   (while
  30.   (/= dt nil)
  31.   (setq dt(read-line txt))
  32.   (command "text" "" dt))
  33.   (close txt)
  34.   (princ))